<template>
  <a-card :bordered="false">
    <Bar title="柱状图" :dataSource="dataSource" :height="450"/>
  </a-card>
</template>

<script>
  import Bar from '@/components/chart/Bar'
  import {getAction} from '@/api/manage'
  import '@/assets/less/TableExpand.less'
  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  export default {
    components: { Bar},
    mixins: [JeecgListMixin],
    name: 'ZhuXingTu',
    data(){
      return {
        dataSource :[{
          x: "机械工程系",
          y: 170
        },{
          x: "计算机工程系",
          y: 180
        },{
          x: "设计艺术系",
          y: 200
        }
          ,{
            x: "体育系",
            y: 120
          }
          ,{
            x: "电子工程系",
            y: 150
          }
        ],
      }
    },
    methods: {
      selectdatasource() {
        let url = "/test123/jeecgDemo123/hello123";
        getAction(url).then((res) => {
          if (res.success) {
            this.dataSource = res.result;
          }
        })
      },

    },
    created() {
      //this.selectdatasource();
    }
  }
</script>

<style scoped>

</style>